#include <iostream>
#include <string>
#include <fstream> 
using namespace std;

int main(){
	ofstream fout("listResult.txt");
	ifstream fin("listCin.txt");
	string name, qq;
	int pos;
	
	while(getline(fin, qq)){
		pos = qq.find("user_id");
		if(pos == -1)
			continue;
		fout << qq.substr(pos+10) << ' ';
		getline(fin, name);
		getline(fin, name);
		pos = name.find("card\"");
		fout << name.substr(pos+8) << endl;
	}
	fout.close();
	fin.close();
	return 0;
}
